from django.urls import path, include
from rest_framework import routers

from operations.views.user_operations.file_upload import (
    AvatarUploadApiViewSet, FileUploadApiViewSet, ImageUploadApiViewSet
)
from operations.views.user_operations.follow import FollowAPIView
from operations.views.user_operations.login import LoginViewSet
from operations.views.user_operations.register import RegisterViewSet
from operations.views.user_operations.send_code import (
    SendSmsVerifyCodeViewSet
)

operations_api_router = routers.DefaultRouter()

operations_api_router.register(
    'register', RegisterViewSet, basename='register'
)
operations_api_router.register(
    'verify-code', SendSmsVerifyCodeViewSet, basename='verify-code'
)
operations_api_router.register(
    'login', LoginViewSet, basename='login'
)
operations_api_router.register(
    'upload-avatar', AvatarUploadApiViewSet, basename='upload-avatar'
)
operations_api_router.register(
    'upload-image', ImageUploadApiViewSet, basename='upload-image'
)
operations_api_router.register(
    'upload-file', FileUploadApiViewSet, basename='upload-image'
)
operations_api_router.register(
    'follow', FollowAPIView, basename='follow'
)

urlpatterns = [
    path('', include((operations_api_router.urls, 'operations'),
                     namespace='operations')),
    # path('login/', obtain_jwt_token, name='login'),
]
